<template>
  <div class="home">
    <Header></Header>
    <CarsouelSwiper :list="swiperList"/>
    <Icon :list="iconList"/>
    <Recommend :list="recommendList"/>
    <Weekend :list="weekendList"/>
  </div>
</template>

<script>
// @ is an alias to /src
import Header from './Header'
import Icon from './Icon'
import Recommend from './Recommend'
import Weekend from './Weekend'
import { mapState, mapGetters } from 'vuex'
export default {
  name: 'HomeView',
  components: {
    Header,
    Icon,
    Recommend,
    Weekend
  },
  mounted() {
    this.$store.dispatch('getBannerList')
  },
  computed: {
    ...mapState({
      List: (state) => state.home.bannerList
    }),
    ...mapGetters(['weekendList', 'swiperList', 'iconList', 'recommendList'])
  }
}
</script>
